SetCurrent Method

The SetCurrent method changes the specified window to be the current window for adding new graphics. The GETWINDOWS function may be used to retrieve the current window.

Note: This method does not change the visibility or focus of the window. The Show method may be used to control visibility.

Example

; Define the data.

plot1data=[0.4, 0.6, 1.4, 2.8, 1.6, 1.5, 1.3, 1.4, 1.3, 1.3, .09, 0.7]

plot2data=[0.6, 0.4, 2.1, 1.2, 1.5, 1.8, 2.3, 3.1, 1.1, 1.7, .07, 0.3]

months=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]

 

; Draw the first plot.

p1 = PLOT(months, plot1data, COLOR='blue', $

AXIS_STYLE=1, THICK=2)

 

; Draw the second plot.

p2 = PLOT(months, plot2data, TITLE='Plot 2', $

COLOR='orange', THICK=2)

 

; Set the current window back to the first plot.

p1.window.SetCurrent

 

; Add another plot to the first window.

p3 = PLOT(months, plot2data, LAYOUT=[2,2,2], /CURRENT)

Syntax

window.SetCurrent

Arguments

None

Keywords

None

Version History

8.2

Introduced

See Also

Show Method, GETWINDOWS, WINDOW